
#ifndef __KTVUART_H__
#define __KTVUART_H__


#ifdef KTV_UART_SUPPORT

	
	class CKtvUart:public CKtvObject{

		
	public:	
		static INT32 openUartForConsole(const char * lpchDevName);
	public:
		CKtvUart();
		virtual ~CKtvUart();
		enum UART_COMMAND_HEAD{
			COMMAND_HEAD_PLAY=1,
			COMMAND_HEAD_STOP=2,
			COMMAND_HEAD_SONG_NUMBER=3,
			};
		INT32 openUart(const char * lpchDevName);
		INT32 closeUart();
		INT32 setBaudrate(UINT32 dwRxBaudrate, UINT32 dwTxBaudrate);
		INT32 setRowmode();
		INT32 setParity(INT32 iDatabits,INT32 iStopbits,INT32 iParity);
		INT32 readData(void * lpRxBuf, INT32 * lpBufSize);
		INT32 writeDate(void* lpTxBuf,INT32 * lpBufSize);
		INT32  write6byteDate(INT16 lpCommandHead,INT32  lpCommandContent);
	private:
		
	private:
		KTV_SYS_HANDLE m_hUart;
	};

#endif //#ifdef KTV_UART_SUPPORT

#endif //#ifndef __KTVUART_H__

